package com.easy.service.impl;

import com.easy.bean.Product;
import com.easy.dao.ProductDao;
import com.easy.service.IProductService;
import com.easy.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductService implements IProductService {
    @Autowired
    ProductDao productDao;
    @Override
    public List getList(Product product, Page page) {
        return productDao.list(product,page);
    }

    @Override
    public Product getProductByID(Integer id) {
        return productDao.getProductByID(id);
    }

    @Override
    public int count(Product product) {
        return productDao.count(product);
    }

    @Override
    public List random(Integer categoryid, Integer count) {
        return productDao.random(categoryid,count);
    }


}
